package edu.dayu.interpreter;

public class Test {
    public static void main(String[] args) {
        Expression robert = new TerminalExpression("Robert");
        Expression john = new TerminalExpression("John");
        OrExpression orExpression = new OrExpression(robert, john);
        AndExpression andExpression = new AndExpression(robert, john);
        System.out.println(orExpression.interpret("John"));
        // true
        System.out.println(andExpression.interpret("Robert John"));
        // true
    }
}
